<?php

namespace FlashMessages\Messages;

use FlashMessages\FlashMessage;
/**
 * Created by ITokarev
 * 
 * Rendering Messages
*/

class ListAction extends \Action
{
	protected static $isPublic = true;
	
	protected static $defaultViews = ['#flashMessages.messages.list'];

	/**
	 * Указываем необходимые неявные параметры
	 * @return multitype:string
	 */
	static function pullParams() {
		return ['identity'];
	}
	
	function run()
	{
		$noticesCollectionIds = FlashMessage::getProfileRequiredNotices($this->request->_identity);
		
		$this->response->noticesCollectionIds = (array) $noticesCollectionIds;
	}
}